home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3766 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  608 b 

  1. Path: news.cuhk.edu.hk!s910500
  2. From: s910500@acs.csc.cuhk.hk (CHAN CHUN CHUNG)
  3. Newsgroups: comp.lang.c
  4. Subject: Unable to check calloc's return values
  5. Date: 31 Jan 1996 00:57:33 GMT
  6. Organization: Chinese University of Hong Kong
  7. Message-ID: <4emept$ifv@hpg30a.csc.cuhk.hk>
  8. NNTP-Posting-Host: s910500@hp755a.csc.cuhk.hk
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Could anyone tell me why the following line is complained by the
  12. compiler? 
  13.  
  14. if ((float **x = (float **) calloc(9, sizeof(float *)))
  15.    == 0) exit(1);
  16.  
  17. What's the right way to check the calloc's return value?
  18.  
  19. Many thanks,
  20. Jerry
  21. s910500@acs.csc.cuhk.hk
  22.